<html>
<head>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/engine.js'></script>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/util.js'></script>
	<script language="JavaScript" type='text/javascript' src='/dwrstudy/dwr/interface/UserService.js'></script>

	<title>User Service</title>
	<script language="JavaScript">
	function getList() {
		UserService.getList(function(data) {
			var idx = 0 ;
			var msg = "";
			for( idx = 0 ; idx < data.length ; idx++) {
				var user = data[idx];
				msg += "[name:"+user.name+",password:"+user.password+"]\n";
			}
			setText(msg);
		});
	}
	function clearList() {
		UserService.clear(function(data) {
			setText("");
		});
	}
	function setText(msg) {
		var ele = document.getElementById("text");
		ele.value = msg;
	}
	</script>
</head>

<body >

<br/>
<li><input type="button" value="Get List" onclick="getList()"/></li>
<li><input type="button" value="Clear" onclick="clearList()"/></li>
<textarea id="text" rows="10" cols="50"></textarea>
</body>
</html>